package com.controller;

public class Triangle {
		private double aWidth;
		private double bWidth;
		private double cWidth;
		public double getaWidth() {
			return aWidth;
		}
		public void setaWidth(double aWidth) {
			this.aWidth = aWidth;
		}
		public double getbWidth() {
			return bWidth;
		}
		public void setbWidth(double bWidth) {
			this.bWidth = bWidth;
		}
		public double getcWidth() {
			return cWidth;
		}
		public void setcWidth(double cWidth) {
			this.cWidth = cWidth;
		}
		
		//计算三角形的面积
		public double area() {
			double p = (aWidth+bWidth+cWidth)/2;
			return Math.sqrt(p*(p-aWidth)*(p-bWidth)*(p-cWidth));
		}
}
